# # 列表元组
#元组不能修改里面的元素, 列表则可以修改里面的元素
# # num1=10
# # num2=20
# # num3=30
#
#
# #创建列表的两种方式
# # alist1=[]
# # print(type(alist1))
# #
# # alist2=list()
# # print(type(alist2))
#
# alist=[1,'hello',True]
# print(alist) #[1, 'hello', True]
#
# alist=[1,2,3,4]
# print(alist) #[1, 2, 3, 4]
# print(alist[2]) #3
# alist[3]=100
# print(alist) #[1, 2, 3, 100]
# #print(alist[100])  #IndexError: list index out of range
# print(len(alist)) #4
#
# print(alist[3])#100
# print(alist[-1]) #100
#
# print(alist[1:3])#[2, 3]
# print(alist[1:])#[2, 3, 100]# 省略后边界, 表示获取到列表末尾
# print(alist[:-1])#[1, 2, 3] # 省略前边界, 表示从列表开头获取
# print(alist[:])#[1, 2, 3, 100] # 省略两个边界, 表示获取到整个列表
#


# alist=[1,2,3,4,5,6,7,8,9,10]
# print(alist[::1])
# print(alist[::2])
# print(alist[::3])
# print(alist[::5])
# [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
# [1, 3, 5, 7, 9]
# [1, 4, 7, 10]
# [1, 6]
# print(alist[100:200]) #[]

#列表的遍历
# alist=[1,2,3,4]
# for elem in alist:
#     print(elem)
# for i in range(0,len(alist)):
#     print(alist[i])
# i=0
# while i<len(alist):
#     print(alist[i])
#     i+=1


#列表的新增元素
# alist=[1,2,3,4]
# alist.append('hello')
# print(alist)
# alist.insert(1,'hello')
# print(alist)
# print(2 in alist)
# print(100 in alist)
# print(alist.index(2))
# # print(alist.index(10))
#
# print("==============")
# alist = [1, 2, 3, 4]
# alist.pop()
# print(alist)
#
# alist = [1, 2, 3, 4]
# alist.pop(2)
# print(alist)
#
# alist = [1, 2, 3, 4]
# alist.remove(3)
# print(alist)

# print("==============")
# #连接列表
# alist=[1,2,3,4]
# blist=[5,6,7]
# # 结果会生成一个新的列表. 而不会影响到旧列表的内容
# print(alist+blist)
# # a.extend(b) , 是把 b 中的内容拼接到 a 的末尾. 不会修改 b, 但是会修改 a.
# alist.extend(blist)
# print(alist)
# print(blist)


#创建元组的两种方式
atuple=()
atuple=tuple()

def getPoint():
    return 10,20
#元组在 Python 中很多时候是默认的集合类型. 例如, 当一个函数返回多个值的时候
result=getPoint()
print(type(result))

